package forteresce.portprofile.gui.events;

import java.awt.event.ComponentEvent;

import javax.swing.JFrame;

/**
 * A component shown event to inform the main panel to show the wait panel 
 * @author forteresce
 */
public class ShowWaitEvent extends ComponentEvent {
	private String message;

	private static final long serialVersionUID = 4379129903147962243L;
	
	/**
	 * Default constructor with no message
	 * @param source frame expected to contain a wait panel 
	 */
	public ShowWaitEvent(JFrame source) {
		this(source, null);
	}
	
	/**
	 * Main contructor
	 */
	public ShowWaitEvent(JFrame source, String message) {
		super(source, COMPONENT_SHOWN);
		this.message = message;
	}
	
	/**
	 * @return the message to be shown
	 */
	public String getMessage() {
		return message;
	}
}
